package fileWriterDemo;

import java.io.FileWriter;
import java.io.IOException;

public class FileWriteDemo1 {
    public static void main(String[] args) throws IOException {
        //写入文件数据
        //1.创建字符集写入对象,在这里打开了续写
        FileWriter fw = new FileWriter("IODemo\\hello.txt",true);
        //2.写入内容
        String str = "你好呀!tom";
        fw.write(str);
        //3.释放资源
        fw.close();
    }
}
